CREATE PROCEDURE coreCmsAdxGetExpired
AS
BEGIN
		SELECT	c.PK_ID, c.FK_STypeID, c.FK_ParentID, c.Rank, c.NodeTitle, c.NodeName, c.NodePath, 
				c.CreatedDT, c.FK_CreatedBy, c.LastModifiedDT, c.FK_LastModifiedBy, c.WorkflowModeID,
				c.WorkflowStatus, c.FK_CheckedOutTo, c.CheckedOutDT, c.CurrentVersionNumber,
				c.HasEmbargoStart, c.PublishStartDT, c.HasEmbargoEnd, c.PublishUntilDT,
				c.ExpiryActionID, c.ExpiryActionDataID, c.HasOwnSecurity,
				v.FK_CheckedInBy, v.CheckedInDT, v.VersionNumber, v.VersionNotes, v.XMLData
		FROM Content c INNER JOIN ContentV v ON v.PK_ID=c.FK_VersionV
		WHERE c.HasEmbargoEnd=1 AND c.PublishUntilDT < GETDATE() AND c.ExpiryActionID > -1;
END
